#pragma once

typedef unsigned int uint;

typedef enum {
   LOCAL,
   GLOBAL,
} AddrSpace;

typedef enum {
	ADDR_IMMEDIAT,
	ADDR_INDIRECT,
} AddrMode;

struct Type {
   int indirection; // 0-30
   // 'const' peut s'appliquer à n'importe quel niveau d'indirection: bit-field
	uint constant_known; // bit poids fort indique les constantes connues. 
};
typedef struct Type Type ;

typedef struct {
	Type type;
	char* name;
} TypedName;

typedef struct {
	int size;
	Type types[16] ;
} ListeArguments ;

typedef struct {
   int addr;
   AddrSpace space;
} Addr;

struct TypedAddr {
   Type type;
   Addr addr;
	AddrMode mode;
};
typedef struct TypedAddr TypedAddr;

#include "context.h"
